package com.syh.jn.scm.domain.support.repository;

import com.syh.core.ddd.domain.Aggregate;
import com.syh.core.ddd.infrastructure.repository.AggregateRepository;

import java.io.Serializable;

/**
 * Created by soci.song on 2018/10/8.
 */
public interface SuperAccountReadRepository<Entity extends Aggregate<ID>, ID extends Serializable> extends AggregateRepository<Entity,ID> {

    public Short getAdminById(Long id);

    /**
     * 根据帐号名获取数量
     *
     * @return
     */
    public Long getCountByAccountName(String accountName);
    /**
     * 根据帐号名获取数量,排除自身
     *
     * @return
     */
    public Long getCountByAccountName(String accountName,Long excludeId);
}
